<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
<head>
    <meta charset="UTF-8">
    <title>权限查询</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css"
          integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"
            integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
            crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
            integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
            crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js"
            integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI"
            crossorigin="anonymous"></script>
    <style>
        .mybtn a {
            color: #fff;
            font-weight: 500;
        }

        .mybtn a:hover {
            color: #fff;
        }

        a:hover {
            text-decoration: none;
        }

    </style>
</head>
<body>
<div>
    <div class="mybtn">
        <button type="button" class="btn btn-success"><a th:href="@{/index}">返回菜单</a></button>
        <button type="button" class="btn btn-danger"><a th:href="@{/logout}">注销</a></button>
    </div>
    <table class="table table-striped" sec:authorize="hasAuthority('AUTHORITY_VIEW')">
        <thead>
        <tr>
            <th scope="col">权限编号</th>
            <th scope="col">权限名称</th>
            <th scope="col">权限描述</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="authority:${authorityList}">
            <td th:text="${authority.getAid()}"></td>
            <td th:text="${authority.getName()}"></td>
            <td th:text="${authority.getDescription()}"></td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>